package com.retailshop.shopuser.entity;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.io.Serializable;

//@ConfigurationProperties("requestconfig")
@Component
public class HttpRequestConfig implements Serializable {

    public static String userServerUrl;//用户接口地址
    public static String orderServerUrl;//订单接口地址
    public static String finaceServerUrl;//积分接口地址
    public static String webServerUrl;//微信接口地址

    @Value("${HttpRequestConfig.userUrl}")
    private  String userUrl;//用户接口地址

    @Value("${HttpRequestConfig.orderUrl}")
    private String  orderUrl;//订单接口地址

    @Value("${HttpRequestConfig.finaceUrl}")
    private  String finaceUrl;//积分接口地址

    @Value("${HttpRequestConfig.webUrl}")
    private  String webUrl;//微信接口地址

    @PostConstruct
    public  void getURL(){
        userServerUrl=this.userUrl;
        orderServerUrl=this.orderUrl;
        finaceServerUrl=this.finaceUrl;
        webServerUrl=this.webUrl;
    }

//   public static  String  getUserServerUrl(){
//        return userServerUrl;
//   }
//   public static  String  getOrderServerUrl(){
//        return orderServerUrl;
//   }
//   public static  String  getFinaceServerUrl(){
//        return finaceServerUrl;
//   }
//   public static  String  getwebServerUrl(){
//        return webServerUrl;
//   }


}
